#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::on_plainTextEdit_textChanged()
{
    QByteArray msg = ui->plainTextEdit->toPlainText().toUtf8();
    msg.append("\r\n");
    QString atcmd = "AT+NSOSD=2," + QString::number(msg.size()) + "," + msg.toHex().toUpper();
    ui->hexTextEdit->setPlainText(atcmd);
}
